import { post, get, del } from "@/utils/request";
//添加购物车
export const addToCart = (product, num = 1) =>
  post("/api/v1/shop_carts", { product, quantity: num });

//   获取购物车列表
export const reqCartlistAPI = () => get("/api/v1/shop_carts");
//删除单个购物车
export const reqDelcartAPI = (id) => del(`/api/v1/shop_carts/${id}`);
//删除多个购物车
export const reqDelcarstAPI = (ids) =>
  post("/api/v1/shop_carts/delmany", { ids });
